package Day8;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] strings = s.split(" ");

        int A = Integer.parseInt(strings[0]);
        int B = Integer.parseInt(strings[1]);

        System.out.print(coMulNum(A, B));
    }

    public static int coMulNum (int a, int b) {

        int finalA = a;
        int finalB = b;

        while (finalB != finalA) {
            while (finalA < finalB) {
                finalA += a;
            }
            if (finalA == finalB) {
                return finalA;
            }
            while (finalB < finalA) {
                finalB += b;
            }
        }
        return finalA;
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        List<String> list = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            list.add(scanner.nextLine());
        }

        boolean len = isLengths(list);
        boolean lex = isLexi(list);

        if (len && lex) {
            System.out.print("both");
        } else if (lex) {
            System.out.print("lexicographically");
        } else if (len) {
            System.out.print("lengths");
        } else {
            System.out.print("none");
        }
    }

    public static boolean isLengths (List<String> list) {
        if (list.size() <= 1) {
            return true;
        }

        for (int i = 0; i < list.size() - 1; i++) {
            if (list.get(i).length() > list.get(i + 1).length() ) {
                return false;
            }
        }
        return true;
    }

    public static boolean isLexi (List<String> list) {
        if (list.size() <= 1) {
            return true;
        }

        for (int i = 0; i < list.size() - 1; i++) {
            if (list.get(i).compareTo(list.get(i+1)) > 0) {
                return false;
            }
        }
        return true;
    }
}
